package com.jinzhi.common.utils;

public enum WxPayLabelEnum {
    balance(1,"余额充值"),
    stupOrder(2,"报名支付"),
    order(3,"订单支付"),
    EWM(4,"扫码支付");



    private int tag;
    private String value;

    public int getTag() {
        return tag;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    WxPayLabelEnum(int tag, String value) {
        this.tag = tag;
        this.value = value;
    }

    public static String getValueByTag(int t) {
        WxPayLabelEnum[] values = WxPayLabelEnum.values();
        for (WxPayLabelEnum tag : values) {
            if (tag.tag == t) {
                return tag.value;
            }
        }
        return "";
    }

    public static int getTagByValue(String v) {
        WxPayLabelEnum[] values = WxPayLabelEnum.values();
        for (WxPayLabelEnum tag : values) {
            if (tag.value.equals(v)) {
                return tag.tag;
            }
        }
        return 0;
    }

}
